﻿#ifndef CYCLONE_TYPE_VISITOR_H
#define CYCLONE_TYPE_VISITOR_H

#pragma once

#include "estree_visitor.hpp"
#include "json_visitor_helper.hpp"

namespace cyclone::parser
{
    class CycloneTypeVisitor : public EstreeVisitor
    {
    public:
        Json visit(FormalParser::PrimitiveTypeContext *ctx) override;
        Json visit(FormalParser::CommaGenericContext *ctx) override;
        Json visit(FormalParser::AngleGenericContext *ctx) override;
        Json visit(FormalParser::TupleTypeContext *ctx) override;
        Json visit(FormalParser::UnionTypeContext *ctx) override;
        Json visit(FormalParser::StructContext *ctx) override;
        Json visit(FormalParser::AnonymousObjectPropertyListContext *ctx) override;
        Json visit(FormalParser::TypeReferenceContext *ctx) override;
        Json visit(FormalParser::ParenthesizedPrimTypeContext *ctx) override;
        Json visit(FormalParser::QualifiedNameContext *ctx) override;

    protected:
        Json visitGenericContext(std::vector<FormalParser::GenericKindContext *> &, FormalParser::Type_Context *internal);
    };

} // namespace cyclone::parser

#endif
